import 'package:todo_project/generated/json/base/json_convert_content.dart';
import 'package:todo_project/api/home_img/bing_img_entity.dart';

BingImgEntity $BingImgEntityFromJson(Map<String, dynamic> json) {
	final BingImgEntity bingImgEntity = BingImgEntity();
	final List<BingImgImages>? images = jsonConvert.convertListNotNull<BingImgImages>(json['images']);
	if (images != null) {
		bingImgEntity.images = images;
	}
	final BingImgTooltips? tooltips = jsonConvert.convert<BingImgTooltips>(json['tooltips']);
	if (tooltips != null) {
		bingImgEntity.tooltips = tooltips;
	}
	return bingImgEntity;
}

Map<String, dynamic> $BingImgEntityToJson(BingImgEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['images'] =  entity.images?.map((v) => v.toJson()).toList();
	data['tooltips'] = entity.tooltips?.toJson();
	return data;
}

BingImgImages $BingImgImagesFromJson(Map<String, dynamic> json) {
	final BingImgImages bingImgImages = BingImgImages();
	final String? startdate = jsonConvert.convert<String>(json['startdate']);
	if (startdate != null) {
		bingImgImages.startdate = startdate;
	}
	final String? fullstartdate = jsonConvert.convert<String>(json['fullstartdate']);
	if (fullstartdate != null) {
		bingImgImages.fullstartdate = fullstartdate;
	}
	final String? enddate = jsonConvert.convert<String>(json['enddate']);
	if (enddate != null) {
		bingImgImages.enddate = enddate;
	}
	final String? url = jsonConvert.convert<String>(json['url']);
	if (url != null) {
		bingImgImages.url = url;
	}
	final String? urlbase = jsonConvert.convert<String>(json['urlbase']);
	if (urlbase != null) {
		bingImgImages.urlbase = urlbase;
	}
	final String? copyright = jsonConvert.convert<String>(json['copyright']);
	if (copyright != null) {
		bingImgImages.copyright = copyright;
	}
	final String? copyrightlink = jsonConvert.convert<String>(json['copyrightlink']);
	if (copyrightlink != null) {
		bingImgImages.copyrightlink = copyrightlink;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		bingImgImages.title = title;
	}
	final String? quiz = jsonConvert.convert<String>(json['quiz']);
	if (quiz != null) {
		bingImgImages.quiz = quiz;
	}
	final bool? wp = jsonConvert.convert<bool>(json['wp']);
	if (wp != null) {
		bingImgImages.wp = wp;
	}
	final String? hsh = jsonConvert.convert<String>(json['hsh']);
	if (hsh != null) {
		bingImgImages.hsh = hsh;
	}
	final int? drk = jsonConvert.convert<int>(json['drk']);
	if (drk != null) {
		bingImgImages.drk = drk;
	}
	final int? top = jsonConvert.convert<int>(json['top']);
	if (top != null) {
		bingImgImages.top = top;
	}
	final int? bot = jsonConvert.convert<int>(json['bot']);
	if (bot != null) {
		bingImgImages.bot = bot;
	}
	final List<dynamic>? hs = jsonConvert.convertListNotNull<dynamic>(json['hs']);
	if (hs != null) {
		bingImgImages.hs = hs;
	}
	return bingImgImages;
}

Map<String, dynamic> $BingImgImagesToJson(BingImgImages entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['startdate'] = entity.startdate;
	data['fullstartdate'] = entity.fullstartdate;
	data['enddate'] = entity.enddate;
	data['url'] = entity.url;
	data['urlbase'] = entity.urlbase;
	data['copyright'] = entity.copyright;
	data['copyrightlink'] = entity.copyrightlink;
	data['title'] = entity.title;
	data['quiz'] = entity.quiz;
	data['wp'] = entity.wp;
	data['hsh'] = entity.hsh;
	data['drk'] = entity.drk;
	data['top'] = entity.top;
	data['bot'] = entity.bot;
	data['hs'] =  entity.hs;
	return data;
}

BingImgTooltips $BingImgTooltipsFromJson(Map<String, dynamic> json) {
	final BingImgTooltips bingImgTooltips = BingImgTooltips();
	final String? loading = jsonConvert.convert<String>(json['loading']);
	if (loading != null) {
		bingImgTooltips.loading = loading;
	}
	final String? previous = jsonConvert.convert<String>(json['previous']);
	if (previous != null) {
		bingImgTooltips.previous = previous;
	}
	final String? next = jsonConvert.convert<String>(json['next']);
	if (next != null) {
		bingImgTooltips.next = next;
	}
	final String? walle = jsonConvert.convert<String>(json['walle']);
	if (walle != null) {
		bingImgTooltips.walle = walle;
	}
	final String? walls = jsonConvert.convert<String>(json['walls']);
	if (walls != null) {
		bingImgTooltips.walls = walls;
	}
	return bingImgTooltips;
}

Map<String, dynamic> $BingImgTooltipsToJson(BingImgTooltips entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['loading'] = entity.loading;
	data['previous'] = entity.previous;
	data['next'] = entity.next;
	data['walle'] = entity.walle;
	data['walls'] = entity.walls;
	return data;
}